package com.example.user.service;

import com.alibaba.dubbo.config.annotation.Service;
import com.example.common.api.news.RelyService;
import com.example.common.model.Rely;
import com.example.user.dao.NewsDao;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * @Auther: wyj
 * @Description:查询评论的service接口实现类
 */
@Service(version = "1.0.0")
@org.springframework.stereotype.Service
public class RelyServiceImpl implements RelyService {

    @Autowired
    private NewsDao newsDao;

    @Override
    public Rely queryRely(String userid) {
        //判断userid是否为空
        if (userid == null) {
            //TODO 日志记录
            return null;
        }

        //调用持久层方法查询评论
        Rely rely = newsDao.queryRely(userid);

        //判断查询结果是否为空
        if (rely == null) {
            //日志记录
        }

        return rely;
    }
}
